<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>property</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
	<style>
    .form-control {display:inline;width:80%;margin-top:10px;margin-right:10px}
    </style>
	<script type="text/javascript">
		$(function(){
			$("input[name='value']").keyup(function(){
				var type = $("input[name='type']");
				if($(this).val().length>0) { if(!type.prop("checked")) type.prop({checked:true}); }
				else { if(type.prop("checked")) type.prop({checked:false}); }
			});
		});
    </script>
</head>

<body>
	<div class="container">
		
        <div class="row">
            <form method="post">
              <div class="form-group">
                <input name="key" value="${key!}" class="form-control {required:true}" placeholder="key">
              </div>
              <div class="form-group">
                <textarea name="value" class="form-control" placeholder="value" rows="12">${value!}</textarea>
                <input type="checkbox" value="set" name="type" title="set">
              </div>
              <div class="form-group">
                <input name="expire" value="${expire!}" class="form-control" placeholder="expire">
                <button onclick="$(this).prev().val('94608000');return false" class="btn btn-default">三年</button>	
              </div>
              <button type="submit" class="btn btn-default">提交</button>
            </form>
        </div>
		
	</div>
	
</body>
</html>